package com.bm.server.controller;

import com.bm.common.vo.R;
import com.bm.server.entity.Activity;
import com.bm.server.service.intf.ActivityService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/server/activity")
public class ActivityController {
    @Resource
    private ActivityService service;
    @GetMapping("/all.do")
    public R all(){
        return service.all();
    }
    @GetMapping("/one.do")
    public R one(@RequestParam int id){
        return service.one(id);
    }
}
